import request from '@/utils/request'
// 获取员工基本信息
// 形参中的id必须是用户的id
export const getEmpInfoAPI = id => request.get('/sys/user/' + id)
// 获取员工简单列表 API
export const getEmpSimpleListAPI = () => request.get('/sys/user/simple')
// 获取员工列表
export const getEmpListAPI = q => request.get('/sys/user', { params: q })
// 新增员工
export const AddEmpAPI = obj => request.post('/sys/user', obj)
// 删除员工
export const delEmpAPI = id => request.delete(`/sys/user/${id}`)
// 批量导入员工
export const addEmpBatchAPI = arr => request.post('/sys/user/batch', arr)
// 更新员工信息的API
export const updateEmpAPI = obj => request.put(`/sys/user/${obj.id}`, obj)
// 给员工分配角色
export const assignRoleAPI = obj => request.put('/sys/user/assignRoles', obj)
